<?php

class Welcome extends Controller {

	function Welcome()
	{
		parent::Controller();
	}

	function index()
	{
		$this->load->view('welcome_message');
	}

	function create_models() {
		echo 'Reminder: Make sure the tables do not exist already.<br />
		<form action="" method="POST">
		<input type="submit" name="action" value="Create Tables"><br /><br />';

		if ($this->input->post('action')) {
			Doctrine::generateModelsFromDb(APPPATH.'/models');
			$this->load->helper('directory');
			$this->load->helper('file');

			echo "Done!";
		}
	}

	function test(){
		$t = new Test();
		$t->text = 'hellow';
		$t->save();
		echo 'done';
	}
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */